import 'package:flutter/material.dart';

/// 构建指定大小的进度条
Widget buildLinearProgress(
  double progress,
  double w, {
  double h = 8,
  double radius = 12,
  Color bgColor = Colors.grey,
  Color valueColor = Colors.blueGrey,
}) {
  return SizedBox(
    width: w,
    height: h,
    child: ClipRRect(
      borderRadius: BorderRadius.all(Radius.circular(radius)),
      child: LinearProgressIndicator(
        backgroundColor: bgColor,
        value: progress,
        // valueColor: AlwaysStoppedAnimation<Color>(
        //     Color(0xff00ff00)),
        valueColor: AlwaysStoppedAnimation<Color>(valueColor),
      ),
    ),
  );
}
